import entity.User;
import service.MyEnum;
import service.MyString;
import service.UserService;
import service.impl.MyEnumImpl;
import service.impl.MyStringImpl;
import service.impl.UserServiceImpl;

import java.util.List;

/**
 * @Author Corday 天涯
 * @Date 2022/3/8 11:18
 */
public class MyApplication {
    public static void main(String[] args) {
        UserService us = new UserServiceImpl();
        //拿到所有数据
        List<User> users = us.findUsers();
        //通过用户名获取数据
        String user = "Ab.D<>";
        String username = "abcd12345";
       User temp = us.findUserByUsername(username);
       String info = temp==null?"用户名非法":temp.toString();
        System.out.println(info);
        System.out.println("-------String用法------");
        MyString ms = new MyStringImpl();
//        ms.playString();
        ms.playStringBuilder();
//        枚举类的用法
        MyEnum myEnum = new MyEnumImpl();
        myEnum.playEnum();
    }//main
}
